# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-flake8-commas
_pkgname=flake8-commas
pkgver=2.0.0
pkgrel=1
pkgdesc="Extension for flake8 to enforce trailing commas"
options="!check" # Uses flake8 not flake8-3 to run tests
url="https://github.com/trevorcreech/flake8-commas"
arch="noarch"
license="MIT"
depends="py3-flake8"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-flake8-commas" # Bacwards compatibility
provides="py-flake8-commas=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="${PWD}/build/lib" py.test-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="454190df8b8068731a8310db69a3b01944600a95d456b133d3746a7d9712cccd4c599b88ccd9b24d74f46843a14752b44c60084f6195e800c5b89891073823d7  flake8-commas-2.0.0.tar.gz"
